public class Euler017 {
	private static final String[] ONE_NUMBER = { "one", "two", "three", "four", "five", "six", "seven", "eight", "nine" };
	private static final String[] TWO_NUMBER = { "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty",
			"ninety" };
	private static final String[] TWO_NUMBER_2 = { "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen",
			"sixteen", "seventeen", "eighteen", "nineteen" };
	private static final String HUNDERED = "HUNDERED";
	private static final String AND = "AND";

	public static void main(String[] args) {

		int A = 0, B = 0, C = 0;
		// A = Tong cua 1-9
		for (String string : ONE_NUMBER) {
			A = A + string.length();
		}
		// B = Tong cua 10-99
		int B1 = 0, B2 = 0;
		for (String string : TWO_NUMBER_2) {
			B2 = B2 + string.length();
		}
		for (String string : TWO_NUMBER) {
			B1 = B1 + string.length();
		}
		B = B1 + B2;
		System.out.println(A);
		System.out.println(B1);
		System.out.println(B2);
		System.out.println(A + B2 + B1 );
		// C = Tong cua 100-999
		for (String string : ONE_NUMBER) {
			C = C + 2 * (string.length() + HUNDERED.length()) + AND.length() + A + B;
		}
		System.out.println(11 + A + B + C);
	}
}